package com.nf.exam.service;

import java.sql.SQLException;
import java.util.List;

import com.nf.exam.dao.ProductDao;
import com.nf.exam.entity.ProductEntity;

public class ProductService {

	private ProductDao dao=new ProductDao();
	
	public int insertProduct(ProductEntity pro) throws SQLException {
		return dao.insertProduct(pro);
	}
	
	public List<ProductEntity> getAll() throws SQLException{
		return dao.getAll();
	}
	
	public int updateProduct(ProductEntity pro) throws SQLException {
		return dao.updateProduct(pro);
	}
	
	public int deleteProduct(int id) throws SQLException {
		return dao.deletePrductId(id);
	}
}
